package historical.cutting.board;


import historical.cutting.board.util.ClipboardHistoryManager;
import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeHookException;
import org.jnativehook.keyboard.NativeKeyListener;

import java.awt.*;

public class ClipboardReader {
    public static void main(String[] args) {
        try {
            // 注册全局钩子（监听系统级按键）
            GlobalScreen.registerNativeHook();
            // 初始化剪贴板管理器并添加快捷键监听器
            ClipboardHistoryManager manager = new ClipboardHistoryManager();
            GlobalScreen.addNativeKeyListener(manager);
        } catch (NativeHookException e) {
            e.printStackTrace();
        } catch (AWTException e) {
            throw new RuntimeException(e);
        }
    }
}